import request from '@/utils/request'

// 查询课程分类列表
export function listType(query) {
  return request({
    url: '/curriculum/type/list',
    method: 'get',
    params: query
  })
}

// 查询课程分类详细
export function getType(id) {
  return request({
    url: '/curriculum/type/' + id,
    method: 'get'
  })
}

// 新增课程分类
export function addType(data) {
  return request({
    url: '/curriculum/type',
    method: 'post',
    data: data
  })
}

// 修改课程分类
export function updateType(data) {
  return request({
    url: '/curriculum/type',
    method: 'put',
    data: data
  })
}

// 删除课程分类
export function delType(id) {
  return request({
    url: '/curriculum/type/' + id,
    method: 'delete'
  })
}

// 修改课程分类状态
export function changeTypeStatus(id,status) {
  const data={
    id,
    status
  }
  return request({
    url: '/curriculum/type/changeTypeStatus',
    method: 'post',
    data:data
  })
}


